<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
	 <base href="<%=basePath%>">
	 <link href=" themes/css/ui.common.css" rel="stylesheet" type="text/css" />
    <link href=" themes/css/ui.child.css" rel="stylesheet" type="text/css" />
    <link href=" themes/css/ui.tips.css" rel="stylesheet" type="text/css" />
    <link href=" themes/base/jquery.ui.button.css" rel="stylesheet" type="text/css" />
    <link id="skin_css" rel="stylesheet" type="text/css" href=" themes/css/ui.c.blue.css" />
    <script src=" Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src=" Scripts/jquery-ui-1.8.custom.min.js" type="text/javascript"></script>
    <script src=" Scripts/jquery.json-2.2.min.js" type="text/javascript"></script>
    <script src=" Scripts/jquery.easyui.min.js" type="text/javascript"></script>
    <script src=" Scripts/ui.admincp.js" type="text/javascript" charset="UTF-8"></script>
    <script src=" Scripts/ui.tips.js" type="text/javascript"></script>
    <script src=" Scripts/ui.default.js" type="text/javascript" charset="UTF-8"></script>
    <script src="js/ui.editableObject.js" type="text/javascript"></script>
    <script src="js/goodsOrderHandler.js" type="text/javascript"></script>
    <script src="js/bussiness.goodsReturn.js" type="text/javascript"></script>
		<title>查看物资信息</title>
	</head>
	<SCRIPT type="text/javascript">
			var searching = false;
				$(function(){
					$("#link_page_prev,#link_page_next").click(function(){
			    		var currentPage = $(this).attr("currentPage");
			    	 
			    		goToPage(currentPage);
			    	}); 
			    	
			    	$("#searchButton").click(function(){
						searching=true;
			    		goToPage(1);
			    	});
			    	
			    	initSearch();
			    	registeRowFuncButton();
				});
				
				function initSearch()
				{
				    $("#txt_noticeTitle").val();
				}
			 
				function goToPage(currentPage)
				{
				    var title = $("#txt_noticeTitle").val();
				    var place =$("#ddl_place").val(); 
				    var cateId=$("#cateId").val();
					var states=$("#states").val();
				     
					location.href = "goodsinfo.action?currpage="+currentPage+"&categoryId="+cateId+"&states="+states;
				}  
			
				
				</SCRIPT>
	
	<body>
	 <div class="PageChild_Title">
        <img src=" themes/images/default/icons/archives.png" class="PageChild_Tbtnpic" />
        <span class="PageChild_separate"></span><span class="PageChild_TbtnText">
            <h2>
              查看物资信息</h2>
        </span><span class="PageChild_separate"></span>
        <div id="marker" class="red-tips">
        </div>
        <div class="clear">
        </div>
    </div>
		<!-- 搜索栏 -->
		<div>
			<div class="PageChild_Where">
				<table>
					<tr>
					<td>
						物资类型:<s:select id="cateId" theme="simple" list="allCateList" listKey="categoryId" listValue="categoryName"  headerKey="-1" headerValue="---全部---" value="categoryId"></s:select>
					</td>
						<td>
							<button id="SearchButton" class="o-btn">
								搜索
							</button>
						</td>
					</tr>
				</table>
			</div>
		</div>
		<!-- 搜索栏结束 -->
		<!-- 列表栏开始 -->
		<div class="PageChild_List">
			<table width="100%" border="0" cellspacing="0"
				style="text-align: left">
				<tbody class="PageChild_List_head">
					<tr>
						<td width="16">
							<img src="themes/images/default/icons/pcde_314.png" width="16"
								height="16" />
						</td>
						<td>
							物资名称
						</td>
						<td>
							物资类型
						</td>
						<td>
							价格
						</td>
						<td>
							总数
						</td>
						<td>
							剩余
						</td>
						<td>
							入库时间
						</td>
					</tr>
				</tbody>
				<tbody class="PageChild_List_main" style="text-align: left">
					<s:if test="list != null && list.size != 0">
					<s:iterator value="list" var="item" status="no">
						<!-- 物资类型列表开始 -->
						<tr class='td_no_bord'>
							<td class="td_width25">
								<s:property value="#no.count" />
							</td>
							<td>
								<span>${item.goodName}</span>&nbsp;
							</td>
							<td>
								<span>
									${item.goodCategory.categoryName}</span>&nbsp;
							</td>
							<td>
								<span> ${item.price} </span>&nbsp;
							</td>
							<td>
								<span>${item.total} </span>&nbsp;
							</td>
							<td>
								<span>
									${item.onStore} </span>&nbsp;
							</td>
							<td>
								<span>
									${item.createTime} </span>&nbsp;
							</td>
						</tr>
					</s:iterator>
					</s:if><s:else>
						<tr><td colspan="10">无记录</td></tr>
					</s:else>
				</tbody>
			</table>

		</div>
		<!-- 列表栏结束 -->
		<!--分页导航开始-->
		<div id="divTopPageNavi" class="list_r_title_text3">

				<!--分页导航开始-->
				<s:if test="currpage<=1">
					<span class='list_r_title_text3a'> <img
							src="themes/images/default/page_up_gray.gif"></img>
					</span>

				</s:if>
				<s:else>
					<span class='list_r_title_text3a'> <a name="link_page_prev"
						id="link_page_prev" href="javascript:void(0);"
						currentPage="${currpage-1}"> <img
								src="themes/images/default/page_up.gif"></img>
					</a> </span>
				</s:else>
				<span class='list_r_title_text3b'> 第${currpage
					}页/共${totalpage }页 </span>
				<s:if test="currpage>=totalpage">
					<span class='list_r_title_text3a'> <img
							src="themes/images/default/page_down_gray.gif"></img>
					</span>
				</s:if>
				<s:else>
					<span class='list_r_title_text3a'> <a name="link_page_next"
						id="link_page_next" href="javascript:void(0);"
						currentPage="${currpage+1 }"> <img
								src="themes/images/default/page_down.gif"></img>
					</a> </span>
				</s:else><span id="goToPageTextArea"><input type="text" id="goPageNum"/> <input type="button" id="turnToPageButton" value="GO"/></span>
			</div>
		<!--分页导航结束-->
	</body>
</html>
